// app.js
App({
	globalData: {
		signature: wx.getStorageSync('signature'),
		token: null,
		nickName: null,
		desc: null,
		openId: null,
		avatarUrl: null,
		shareKey: null,
		needReRefresh: false,
		needReRefreshPuchCards: true,
	},


	showNoLoginDialog() {
		wx.showModal({
			title: '授权提醒',
			content: '您需要进行授权登录后才可以使用小程序功能。',
			showCancel: false,
			complete: (res) => {
				if (res.cancel) {

				}

				if (res.confirm) {
					wx.switchTab({
						url: '/pages/me/me',
					})
				}
			}
		})
	},

	//根据类型获取图片引用
	getActivityImg(type) {
		switch (type) {
			case 0:
				return "/imgs/activity/png_dance.png";
			case 1:
				return "/imgs/activity/png_eat.png";
			case 2:
				return "/imgs/activity/png_beer.png";
			case 3:
				return "/imgs/activity/png_ktv.png";
			case 4:
				return "/imgs/activity/png_note.png";
		}
		return "/imgs/activity/png_dance.png"
	},

})